package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author zhangyy
 * @since 2020-06-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_stock_history")
public class StockHistoryDo extends Model<StockHistoryDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("shop_id")
    private Long shopId;

    @TableField("storage_id")
    private Long storageId;

    @TableField("can_sell")
    private int canSell;

    @TableField("canot_sell")
    private int canotSell;

    @TableField("company_id")
    private Long companyId;

    @TableField("freeze_count")
    private int freezeCount;

    @TableField("repairing_count")
    private int repairingCount;
    /**
     * 库存花费
     */
    @TableField("cost")
    private double cost;

    /**
     * 总体积
     */
    @TableField("total_volume")
    private double totalVolume;
    /**
     * 一档体积
     */
    @TableField("v1_volume")
    private double v1Volume;
    /**
     * 二档体积
     */
    @TableField("v2_volume")
    private double v2Volume;
    /**
     * 三档体积
     */
    @TableField("v3_volume")
    private double v3Volume;

    /**
     * 当前总货值
     */
    @TableField("value")
    private double value;

    /**
     * 长期货值扣减费用
     */
    @TableField("long_time_cost")
    private double longTimeCost;

    /**
     * 创建日期
     */
    @TableField("create_date")
    private Date createDate;

    @TableField("delete_flag")
//    @TableLogic
    private Integer deleteFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
